home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1997 February / PC Shareware 1997-02.iso / programy / e! / api / ewuser.in_ / ewuser.INC
Encoding:
Text File  |  1995-03-05  |  9.9 KB  |  326 lines

  1. {-EW API - Useful constants and types used in Extension DLLs}
  2.  
  3. const
  4.  
  5. {-Command codes used to identify EW functions within hooks}
  6.  
  7. ew_MFOpen         =    201;
  8. ew_MFNew         =    202;
  9. ew_MFClone         =    203;
  10. ew_MFGet         =    204;
  11. ew_MFWrite         =    205;
  12. ew_MFAppend         =    206;
  13. ew_MFSave         =    207;
  14. ew_MFSaveAs         =    208;
  15. ew_MFRefresh         =    209;
  16. ew_MFGrep         =    210;
  17. ew_MFAssociate         =    211;
  18. ew_MFCC          =    215;
  19. ew_MFPrint         =    217;
  20. ew_MFPrintSetup      =    218;
  21. ew_MFPageSetup         =    219;
  22. ew_MFExitEditor      =    221;
  23. ew_MFExit         =    222;
  24.  
  25. ew_MEUndo         =    301;
  26. ew_MERedo         =    325;
  27. ew_MEClearUndo         =    302;
  28. ew_MECut         =    304;
  29. ew_MECutAppend         =    305;
  30. ew_MECopy         =    306;
  31. ew_MECopyAppend      =    307;
  32. ew_MEPasteIns         =    308;
  33. ew_MEPasteOvr         =    309;
  34. ew_MEClear         =    311;
  35. ew_MESelectAll         =    312;
  36. ew_MEDelete         =    314;
  37. ew_MEDraw         =    316;
  38. ew_MERecordMac         =    318;
  39. ew_MELoadMac         =    319;
  40. ew_MESaveMac         =    320;
  41. ew_MEReplayMac         =    321;
  42. ew_MEReplayMacN      =    322;
  43. ew_MEClearMac         =    323;
  44. ew_MEAsciiMode         =    324;
  45.  
  46. ew_MBSet         =    401;
  47. ew_MBGotoMark1         =    403;
  48. ew_MBGotoMark2         =    404;
  49. ew_MBGotoMark3         =    405;
  50. ew_MBRemoveMark1     =    407;
  51. ew_MBRemoveMark2     =    408;
  52. ew_MBRemoveMark3     =    409;
  53. ew_MBGoto         =    411;
  54. ew_MBGotoSel         =    412;
  55. ew_MBCompare         =    414;
  56.  
  57. ew_MSFind         =    501;
  58. ew_MSRepeatFind      =    502;
  59. ew_MSFindWord         =    503;
  60.  
  61. ew_MCCompile         =    601;
  62. ew_MCMake         =    602;
  63. ew_MCRebuild         =    603;
  64. ew_MCDebug         =    604;
  65. ew_MCExecute         =    605;
  66. ew_MCNext         =    607;
  67. ew_MCPrevious         =    608;
  68. ew_MCCommands         =    610;
  69. ew_MCScan         =    612;
  70. ew_MCJumpToDef         =    613;
  71. ew_MCEditProject     =    614;
  72. ew_MCAddTag         =    615;
  73.  
  74. ew_MLSet         =    701;
  75. ew_MLSaveCnf         =    702;
  76. ew_MLLoadCnf         =    703;
  77. ew_MLAssign         =    705;
  78. ew_MLExpansion         =    707;
  79.  
  80. ew_MWRibbon         =    801;
  81. ew_MWCustomRibbon    =    802;
  82. ew_MWHide         =    803;
  83. ew_MWTile         =    805;
  84. ew_MWCascade         =    806;
  85. ew_MWHideAll         =    807;
  86. ew_MWIconizeAll      =    808;
  87. ew_MWScrolling         =    810;
  88. ew_MWFont         =    812;
  89. ew_MWNextEditor      =    814;
  90. ew_MWPrevEditor      =    815;
  91.  
  92. ew_MULoadExt         =    901;
  93. ew_MUUnloadExt         =    902;
  94. ew_MUExecuteExt      =    903;
  95. ew_MUAutoLoad         =    904;
  96. ew_DefineMenu         =    906;
  97.  
  98. ew_AddTab         = 9001;
  99. ew_AlternateHelp     = 9086;
  100. ew_BlockShift         = 9010;
  101. ew_BeginLine         = 9011;
  102. ew_CasePrimUpper     = 9012;
  103. ew_CasePrimLower     = 9013;
  104. ew_CheckBrace         = 9014;
  105. ew_ClearLine         = 9015;
  106. ew_DeleteCurLine     = 9016;
  107. ew_DeleteEOL         = 9017;
  108. ew_DeleteLeftChar    = 9018;
  109. ew_DeleteWord         = 9019;
  110. ew_EndLine         = 9020;
  111. ew_Enter         = 9021;
  112. ew_GoNextPar         = 9022;
  113. ew_GoNextTab         = 9023;
  114. ew_GoPrevPar         = 9024;
  115. ew_GoPrevTab         = 9025;
  116. ew_InputPause         = 9026;
  117. ew_InsertBrace         = 9027;
  118. ew_InsertDate         = 9028;
  119. ew_InsertFilename    = 9029;
  120. ew_InsertTime         = 9030;
  121. ew_JoinLine         = 9031;
  122. ew_LoadUserFile      = 9032;
  123. ew_NextCol         = 9041;
  124. ew_NextLine         = 9042;
  125. ew_NextWord         = 9043;
  126. ew_PageBottom         = 9044;
  127. ew_PageTop         = 9045;
  128. ew_PageScrollHLeft   = 9046;
  129. ew_PageScrollHRight  = 9047;
  130. ew_PageScrollVDown   = 9048;
  131. ew_PageScrollVUp     = 9049;
  132. ew_PrevCol         = 9050;
  133. ew_PrevLine         = 9051;
  134. ew_PrevWord         = 9052;
  135. ew_Reflow         = 9054;
  136. ew_RemoveTab         = 9055;
  137. ew_SetCurLine2Bottom = 9056;
  138. ew_SetCurLine2Middle = 9057;
  139. ew_SetCurLine2Top    = 9058;
  140. ew_ShiftTextRight    = 9059;
  141. ew_SplitLine         = 9072;
  142. ew_StepScrollDown    = 9073;
  143. ew_StepScrollLeft    = 9074;
  144. ew_StepScrollRight   = 9075;
  145. ew_StepScrollUp      = 9076;
  146. ew_StripFlow         = 9077;
  147. ew_SumBlock         = 9078;
  148. ew_TextBoundBegin    = 9079;
  149. ew_TextBoundEnd      = 9080;
  150. ew_TextToCursor      = 9081;
  151. ew_ToggleIns         = 9082;
  152. ew_UpcaseFirst         = 9083;
  153. ew_UserBlockSort     = 9084;
  154. ew_UserFillBlock     = 9085;
  155. ew_RibbonMacro1      = 9088;
  156. ew_RibbonMacro2      = 9089;
  157. ew_RibbonMacro3      = 9090;
  158.  
  159. {-Value that should be returned by EWExecute or by a hook if the extension  }
  160. { failed. Otherwise return 0 or leave the original EW return code unchanged.}
  161.  
  162. ewerr_EXTFAILED = 300;
  163.  
  164. {-Values returned by EWCallUserExt if the extension could not be executed}
  165.  
  166. ewerr_NOSUCHEXTENSION = 301;
  167. ewerr_NOEXECEXPORTED  = 302;
  168.  
  169. {-Values that may be returned after execution of an editing function}
  170.  
  171. ewerr_CANTMOVE           = 351;  { The cursor could not be moved as requested }
  172. ewerr_CANTPROCEED      = 352;  { The function could not be executed }
  173.  
  174. {-Values passed by EWSetHook and EWRemoveHook to EW}
  175.  
  176. EWHook_FunctionEntry    = 0;
  177. EWHook_FunctionExit    = 1;
  178. EWHook_KeyboardEntry    = 2;
  179. EWHook_PaintEntry    = 3;
  180. EWHook_LoadExit     = 4;
  181. EWHook_Notify        = 5;
  182.  
  183. {-Values passed by EW to the callback notification hook to identify the event}
  184.  
  185. EWNotify_ExitEditor    = 0;
  186. EWNotify_CreateClone    = 1;
  187. EWNotify_DestroyClone    = 2;
  188. EWNotify_FileAutosaved    = 3;
  189. EWNotify_FontChanged    = 4;
  190. EWNotify_PosChanged    = 5;
  191. EWNotify_ActWinChanged    = 6;
  192. EWNotify_CharEntry    = 7;
  193. EWNotify_CharExit    = 8;
  194. EWNotify_CreateEditor    = 9;
  195.  
  196. {-Possible assignment modes when using EWAddMenuEntry}
  197.  
  198. EWMNU_Program    = 0;
  199. EWMNU_Command    = 1;
  200. EWMNU_Macro    = 2;
  201. EWMNU_Extension = 3;
  202.  
  203. {-Global Flags constants}
  204.  
  205.   EWGlbShow         =  1;       { Show edit window when created }
  206.   EWGlbShowWild      =  2;       { Show windows created with wildcards }
  207.   EWGlbMinCC         =  3;       { Iconize CC after creating window }
  208.   EWGlbReShowCC      =  4;       { Reshow CC after edit window creation }
  209.   EWGlbDispShortCuts     =  5;       { Display shortcuts in menus }
  210.   EWGlbReplaceSel     =  6;       { Typing replace Selection }
  211.   EWGlbAddOnLast     =  7;       { Insert with down arrow on last line }
  212.   EWGlbFormatFrom     =  8;       { Format from current line only }
  213.   EWGlbExpansion     =  9;       { Syntax Expansion enabled }
  214.   EWGlbAutoMacros     = 10;       { Auto Macros enabled }
  215.   EWGlbEnterClassic     = 11;       { Split line with Enter }
  216.   EWGlbInsert         = 12;       { Insert on by default }
  217.   EWGlbAutoScroll     = 13;       { Use autoscroll mode }
  218.   EWGlbAlarm         = 14;       { Beep on error }
  219.   EWGlbLog         = 15;       { Maintain session logging }
  220.   EWGlbBak         = 16;       { Create .BAK flags }
  221.   EWGlbWarning         = 17;       { Warning before file overwrite }
  222.   EWGlbLoadList      = 18;       { @xxxx.xxx files are lists }
  223.   EWGlbAutosaveOpt     = 19;       { Autosave options }
  224.   EWGlbAutosave      = 20;       { Autosave files }
  225.   EWGlbDeleteOut     = 21;       { Suppress .ERR file }
  226.   EWGlbGrepRegular     = 22;       { Grep uses Boolean Search }
  227.   EWGlbGrepAnsi      = 23;       { Grep uses Ansi charset }
  228.   EWGlbGrepCase      = 24;       { Grep makes a case sensitive search }
  229.   EWGlbGrepSubDir     = 25;       { Grep searches in subdirectories }
  230.   EWGlbJump         = 26;       { Jump on Home/End }
  231.   EWGlbHasScrollbars     = 27;       { Edit Windows have Scrollbars }
  232.   EWGlbHasRibbon     = 28;       { Edit Windows have a Ribbon }
  233.   EWGlbRepaint         = 29;       { Scroll method }
  234.   EWGlbStripJoin     = 30;       { Strip Spaces when joining Lines }
  235.   EWGlbSaveBefore     = 31;       { Autosave Files before compiling }
  236.  
  237. {-New Flags}
  238.   EWGlbHasQuickList     = 32;       { Ribbon has a QuickList }
  239.   EWGlbCompoundWords     = 33;       { - and _ are delimiters }
  240.   EWGlbSmartComp     = 34;       { Smart Compare }
  241.   EWGlbHilite         = 35;       { Syntax Highlighting is on }
  242.   EWGlbUseNoName     = 36;       { Untitled new files }
  243.   EWGlbUseAlt         = 37;       { Use Alt key instead of Ctrl key for Drag and copy }
  244.   EWGlbMacroRefresh     = 38;       { Refresh screen when replaying macro }
  245.  
  246. {-Local Flags constants}
  247.  
  248.   EWLclbBlank        =  1;       { Strip trailing blanks }
  249.   EWLclbAutoBack    =  2;       { Backspace behaviour }
  250.   EWLclbAutoTab     =  4;       { Autotab flag }
  251.   EWLclbAutoInsert  =  5;       { AutoInsert braces }
  252.   EWLclbAutoComp    =  6;       { AutoCompress tabs }
  253.   EWLclbWordWrap    =  7;       { Wordwrap }
  254.   EWLclbJustify     =  8;       { Right justification }
  255.   EWLclbLoadAscii   =  9;       { Loaded file supposed to be Ascii file }
  256.   EWLclbSaveAscii   = 10;       { Save file in Ascii format }
  257.   EWLclbEOF        = 11;       { Add a Ctrl Z at the end of the file }
  258.   EWLclbAutoIndent  = 12;       { Auto Indentation }
  259.  
  260. {-Search Flags constants}
  261.  
  262.   EWSearchbBackward  =    1;       { Backward search }
  263.   EWSearchbBlock     =    2;       { Search within marked block only }
  264.   EWSearchbCase      =    3;       { Case sensitive search }
  265.   EWSearchbKeepCase  =    4;       { Keep case type when replacing string }
  266.   EWSearchbGlobal    =    5;       { Global Search }
  267.   EWSearchbGothru    =    6;       { Replace without prompting }
  268.   EWSearchbRegular   =    7;       { Boolean search flag }
  269.   EWSearchbWord      =    8;       { Word-only search }
  270.   EWSearchbAcross    =    9;       { Search across edited files }
  271.  
  272. {-Compile command codes}
  273.  
  274.   EWCompileCommand   =    0;
  275.   EWMakeCommand      =    1;
  276.   EWBuildCommand     =    2;
  277.   EWDebugCommand     =    3;
  278.   EWExecuteCommand   =    4;
  279.  
  280. {-Macro string codes}
  281.  
  282.   EWMacro_Time         =    0;
  283.   EWMacro_Date         =    1;
  284.   EWMacro_FileName   =    2;
  285.  
  286. {-Position codes}
  287.  
  288.   EWPosition_Top     = 0;
  289.   EWPosition_Middle  = 1;
  290.   EWPosition_Bottom  = 2;
  291.  
  292. {-Selection modes}
  293.  
  294.   EWSelection_None   = 0;
  295.   EWSelection_Line   = 1;
  296.   EWSelection_Stream = 2;
  297.   EWSelection_Block  = 3;
  298.  
  299. {-Write modes for EWWriteBlock}
  300.  
  301.   EWWrite_ReWrite    = 1;
  302.   EWWrite_Append     = 2;
  303.  
  304. type
  305.  
  306.   PSelStruct = ^TSelStruct;
  307.   TSelStruct = record
  308.     SelType      : word;
  309.     FirstSelLine,
  310.     LastSelLine,
  311.     StartSelIndex,
  312.     EndSelIndex   : longint;
  313.     FirstSelCol,
  314.     LastSelCol      : integer;
  315.   end;
  316.  
  317.   TEnumEditorsProc = procedure(EditorId : longint; Name : PChar);
  318.   TEnumClonesProc  = procedure(CloneHandle : THandle; CloneId : byte);
  319.   TFuncEntryHook   = function(command : word) : integer;
  320.   TFuncExitHook    = function(command : word; pRetcode : PInteger) : integer;
  321.   TKbdEntryHook    = function(Msg : TMsg) : integer;
  322.   TPaintEntryHook  = function(DC : HDC; PaintInfo : PPaintStruct; SelInfo : PSelStruct; hWindow : word) : integer;
  323.   TLoadExitHook    = function(EditorId : longint) : integer;
  324.   TNotifyHook       = function(eventcode : word; wParam : word; lParam : longint) : integer;
  325.   TExecFunc       = function(RoutineId : word) : integer;
  326.